<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel='stylesheet' href='../../../public/stylesheets/index.css'/>
</head>
<body>
<section>
    <div class="sectionMain">
        <div class="bgGray">
            <input id="startTime" type="date" value="2015-09-24"/>
            <input id="endTime" type="date" value="2015-09-24"/>
            <label><input id="r1" name="uid" onclick="model.order(['id',this.value])" type="radio" value="ASC" checked/>正序</label>
            <label><input id="r2" name="uid" onclick="model.order(['id',this.value])" type="radio" value="DESC"/>倒叙</label>
            <button onclick="model.screen()">筛选</button>
        </div>
        <div class="biaomingTable">
            <span id="titleName" class="TableName"></span>
        </div>
        <div class="sectionMainTable"></div>
        <div class="center">
            <ul class="pagination">

            </ul>
        </div>
    </div>
</section>
</body>
<script src="../../js/script_min.js"></script>
<script src="../../js/util.js"></script>
<script src="../../js/sheet.js"></script>
<script>
    class suggestion extends sheet{
        screen(){
            this.postData.screen.startTime= new Date($("#startTime").val()).getTime();
            this.postData.screen.endTime = new Date($("#endTime").val()).getTime();
            this.init(0).then(res=>{this.setTitle()});
        };
        setTitle(){
            $('#titleName').text('帮助与建议(' + this.storage.count + ')');
        };
    }
    let model = new suggestion({
        api:`backStage-suggestion`,
        postData:{
            page:window.sessionStorage.getItem("page")||0,
            limit:20,
            order:JSON.parse(window.sessionStorage.getItem("order"))||["id","ASC"],
            screen:{startTime:0,endTime:new Date().getTime()},
        },

    });
    model.init().then(res=>{model.setTitle();});
    $("#endTime").val(model.getEndTime());
</script>
</html>